<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>杭州常青树生物科技有限公司</title>
    <!-- css -->
<!--    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">-->
<!--    <link rel="stylesheet" href="materialize/css/materialize.min.css" media="screen,projection" />-->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
<!--    <link href="assets/css/fancybox/jquery.fancybox.css" rel="stylesheet">-->
<!--    <link href="assets/css/flexslider.css" rel="stylesheet" />-->
    <link href="assets/css/style.css" rel="stylesheet" />

    <style>

        .product {
            display: flex;
            max-width: 800px;
            margin: 0 auto;
        }

        .product .product-img {
            width: 300px;
            height: 300px;
        }
        .product .right {
            flex: 1;
            margin-left: 20px;
        }

        .right .title {
            font-size: 28px;
            color: black;
            margin-top: 10px;
        }
        .right .detail {
            font-size: 18px;
            margin-top: 20px;
        }

        .right .price {
            font-size:  28px;
            margin-top: 30px;
        }

        #content .detail-content {
            text-align: center;
            max-width: 800px;
            margin: 50px auto 0;
        }
        #content .detail-content>img {
            width: 100%;
            max-width: 800px;
        }


    </style>

</head>
<body>
<div id="wrapper" class="home-page">
    <!-- start header -->
    <header>
        <div class="navbar navbar-default navbar-static-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="index.html"><img alt="logo" src="assets/images/logo.png"><span>杭州常青树生物科技有限公司</span></a>
                </div>

                <div class="navbar-collapse collapse ">
                    <ul class="nav navbar-nav">
                        <li class="active"><a class="waves-effect waves-dark" href="index.html">首页</a></li>
                        <!--						<li class="dropdown">-->
                        <!--							<a href="#" data-toggle="dropdown" class="dropdown-toggle waves-effect waves-dark">About Us <b class="caret"></b></a>-->
                        <!--							<ul class="dropdown-menu">-->
                        <!--								<li><a class="waves-effect waves-dark" href="about.html">Company</a></li>-->
                        <!--								<li><a class="waves-effect waves-dark" href="#">Our Team</a></li>-->
                        <!--								<li><a class="waves-effect waves-dark" href="#">News</a></li>-->
                        <!--								<li><a class="waves-effect waves-dark" href="#">Investors</a></li>-->
                        <!--							</ul>-->
                        <!--						</li>-->
                        <!--						<li><a class="waves-effect waves-dark" href="services.html">Services</a></li>-->
                        <!--                        <li><a class="waves-effect waves-dark" href="portfolio.html">Gallery</a></li>-->
                        <!--                        <li><a class="waves-effect waves-dark" href="pricing.html">Pricing</a></li>-->
                        <li><a class="waves-effect waves-dark" href="app_download.html">APP下载</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </header>
    <!-- end header -->


<!--    <section class="product">-->
<!--        -->

<!--    </section>-->

    <section id="content">
        <div class="product">
            <img src="#" class="product-img">
            <div class="right">
                <div class="title"></div>
                <div class="detail"></div>
                <div class="price"></div>
            </div>
        </div>
        <div class="detail-content">
<!--            <img src="" class="detail-image">-->
        </div>
    </section>

    <section class="section-padding gray-bg">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="section-title text-center">
                        <h2>配送说明</h2>
                        <!--						<p>Curabitur aliquet quam id dui posuere blandit. Donec sollicitudin molestie malesuada Pellentesque <br>ipsum id orci porta dapibus. Vivamus suscipit tortor eget felis porttitor volutpat.</p>-->
                    </div>
                </div>
            </div>
            <div class="row">
                <!--				class="col-md-6 col-sm-6"-->
                <div >
                    <div class="about-text">
                        <!--						<p>Grids is a responsive Multipurpose Template. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur aliquet quam id dui posuere blandit. Donec sollicitudin molestie malesuada. Pellentesque in ipsum id orci porta dapibus. Vivamus suscipit tortor eget felis porttitor volutpat.</p>-->
                        <ul class="withArrow">
                            <li><span class="fa fa-angle-right"></span>1、田舅爷默认中通快递，生鲜为顺丰快递，顺丰不到的地区暂不发货。</li>
                            <li><span class="fa fa-angle-right"></span>2、到货时间为货物发出后24-72小时内，具体到货时间以快递时间为准。</li>
                            <li><span class="fa fa-angle-right"></span>3、由于各地温度有所差别，生鲜会有些许软化或者化冻现象，但只要肉的温度是冰凉的，肉质就不会受到影响，可放心实用。</li>
                            <li><span class="fa fa-angle-right"></span>4、辽宁、云南、山西、黑龙江、贵州、吉林、甘肃、青海、内蒙古、宁夏、新疆、西藏等地区不包邮，其余地区包邮；港澳台等偏远地区不发货。</li>
                            <li><span class="fa fa-angle-right"></span>5、生鲜属于速冻食品、不支持退换货，有任何问题请联系客服。</li>
                        </ul>
                        <!--						<a href="#" class="btn btn-primary waves-effect waves-dark">Learn More</a>-->
                    </div>
                </div>
                <!--				<div class="col-md-6 col-sm-6">-->
                <!--					<div class="about-image">-->
                <!--						<img src="img/about.jpg" alt="About Images">-->
                <!--					</div>-->
                <!--				</div>-->
            </div>
        </div>
    </section>


    <footer>
        <div class="container">
            <div class="row">
                <div class="col-lg-6git">
                    <div class="widget">
                        <h5 class="widgetheading">联系我们</h5>
                        <p>
                            浙江省杭州市西湖区文三路478号华星时代广场A座16层1602室，310012 <br>
                            0571-89980007 <br>
                        </p>
                        <p><a href="privacy_policy.html" target="_blank">隐私政策</a></p>
                    </div>
                </div>
                <!--			<div class="col-lg-4">-->
                <!--				<div class="widget">-->
                <!--					<h5 class="widgetheading">Quick Links</h5>-->
                <!--					<ul class="link-list">-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Latest Events</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Terms and conditions</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Privacy policy</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Career</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Contact us</a></li>-->
                <!--					</ul>-->
                <!--				</div>-->
                <!--			</div>-->
                <!--			<div class="col-lg-3">-->
                <!--				<div class="widget">-->
                <!--					<h5 class="widgetheading">Latest posts</h5>-->
                <!--					<ul class="link-list">-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Pellentesque et pulvinar enim. Quisque at tempor ligula</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Natus error sit voluptatem accusantium doloremque</a></li>-->
                <!--					</ul>-->
                <!--				</div>-->
                <!--			</div>-->
                <!--			<div class="col-lg-3">-->
                <!--				<div class="widget">-->
                <!--					<h5 class="widgetheading">Recent News</h5>-->
                <!--					<ul class="link-list">-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Pellentesque et pulvinar enim. Quisque at tempor ligula</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Natus error sit voluptatem accusantium doloremque</a></li>-->
                <!--					</ul>-->
                <!--				</div>-->
                <!--			</div>-->
            </div>
        </div>
        <div id="sub-footer">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6">
                        <div class="copyright">
                            <p>
                                Copyright &copy; 2019 <a target="_blank" href="#">杭州常青树生物科技有限公司</a> All rights reserved.
                                <a target="_blank" href="http://www.beian.miit.gov.cn">浙ICP备19049239号</a>
                            </p>
                        </div>
                    </div>
                    <!--				<div class="col-lg-6">-->
                    <!--					<ul class="social-network">-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Facebook"><i class="fa fa-facebook"></i></a></li>-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Twitter"><i class="fa fa-twitter"></i></a></li>-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Linkedin"><i class="fa fa-linkedin"></i></a></li>-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Pinterest"><i class="fa fa-pinterest"></i></a></li>-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Google plus"><i class="fa fa-google-plus"></i></a></li>-->
                    <!--					</ul>-->
                    <!--				</div>-->
                </div>
            </div>
        </div>
    </footer>
</div>

<!-- go to top -->
<a href="#" class="scrollup waves-effect waves-dark"><i class="fa fa-angle-up active"></i></a>
<!-- javascript
    ================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery.js"></script>
<script src="assets/js/jquery.easing.1.3.js"></script>
<!--<script src="materialize/js/materialize.min.js"></script>-->
<script src="assets/js/bootstrap.min.js"></script>
<!--<script src="assets/js/jquery.fancybox.pack.js"></script>-->
<!--<script src="assets/js/jquery.fancybox-media.js"></script>-->
<!--<script src="assets/js/jquery.flexslider.js"></script>-->
<!--<script src="assets/js/animate.js"></script>-->
<!-- Vendor Scripts -->
<!--<script src="assets/js/modernizr.custom.js"></script>-->
<!--<script src="assets/js/jquery.isotope.min.js"></script>-->
<!--<script src="assets/js/jquery.magnific-popup.min.js"></script>-->
<!--<script src="assets/js/animate.js"></script>-->
<script src="assets/js/custom.js"></script>
<script>
    window.onload = function () {
        const id = GetQueryValue('id');
        console.log(id);
        if (!id) {
            alert("无效的商品");
            return;
        }
        $.getJSON("./pruducts.json",function (res) {
            // console.log(res)
            var item = null;
            for (var key in res) {
                const _item = res[key];
                // console.log(item);
                if (_item.id == id) {
                    item = _item;
                    break;
                }
            }
            if (!item) {
                alert("无效的商品");
                return;
            }
            $('.product .product-img').attr("src", item.icon);
            $('.product .title').text(item.title);
            $('.product .detail').text(item.detail);
            $('.product .price').text(item.price);
            var html = '';
            for (var i = 0 ; i < item.images.length; i ++) {
                html += '<img src="'+ item.images[i] +'">'
            }

            $('.detail-content').html(html);

        });
    };
    /**
     * [通过参数名获取url中的参数值]
     * 示例URL:http://htmlJsTest/getrequest.html?uid=admin&rid=1&fid=2&name=小明
     * @param  {[string]} queryName [参数名]
     * @return {[string]}           [参数值]
     */
    function GetQueryValue(queryName) {
        var reg = new RegExp("(^|&)" + queryName + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if ( r != null ){
            return decodeURI(r[2]);
        }else{
            return null;
        }
    }
</script>
</body>
</html>